<% if @user.errors.any? %>
  <div id="error_explanation">
    <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>

    <ul>
    <% @user.errors.full_messages.each do |msg| %>
      <li><%= msg %></li>
    <% end %>
    </ul>
  </div>
<% end %>

<%= form_for(@user) do |f| %>
  <div class="field">
    <%= f.label      :username %>
    <%= f.text_field :username %>
  </div>
  <div class="field">
    <%= f.label "Vacation Days:" %>
    <%= f.text_field :alloted_vacation_days %>
  </div>
  <div class="field">
    <%= f.label "PC Days:" %>
    <%= f.text_field :alloted_pc_days%>
  </div>

  <% if @current_user.administrator %>
    <div class="inline_container">
      <%= f.label     :administrator %>
      <%= f.check_box :administrator %>
    </div>
    <div class="inline_container">
      <%= f.label     :validated %>
      <%= f.check_box :validated %>
    </div>
  <%end%>

  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

<% if @current_user.administrator %>
  <%= link_to 'Edit User Rights', edit_right_path(@user.right) %> | 
<% end %>

<%= link_to 'Show', @user %> |
<%= link_to 'Back', users_path %>
